import request from '@/utils/request'

// 查询项目与人员分配列表
export function listProjectUserAssignment(projectId, query) {
  return request({
    url: `/user/project/projectUserAssignment/list/${projectId}`,
    method: 'get',
    query
  })
}

// 查询项目与人员分配列表
export function listAllProjectUserAssignment(projectId, query) {
  return request({
    url: `/user/project/projectUserAssignment/listAll/${projectId}`,
    method: 'get',
    query
  })
}

// 添加人员
export function addUser(user) {
  return request({
    url: `/user/project/projectUserAssignment/addUser`,
    method: 'post',
    data: user
  })
}

export function upUser(user) {
  return request({
    url: `/user/project/projectUserAssignment/upUser`,
    method: 'post',
    data: user
  })
}

export function delUser(id) {
  return request({
    url: `/user/project/projectUserAssignment/delUser/{id}`,
    method: 'delete',
  })
}
